import { useStore } from '@/store'
import UserInfo from './components/UserInfo'

export default function ProfilePage() {
  const { logout } = useStore((s) => ({ logout: s.logout }))
  
  return (
    <div className="space-y-6">
      <h2 className="text-2xl font-bold">个人中心</h2>
      
      <div className="p-6 bg-white rounded-lg shadow">
        <UserInfo />
        
        <div className="mt-4 pt-4 border-t">
          <button 
            onClick={logout}
            className="px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600 transition-colors"
          >
            退出登录
          </button>
        </div>
      </div>
    </div>
  )
} 